package com.drore.logapp.http;


import com.drore.logapp.bean.BaseBean;
import com.drore.logapp.bean.LogBean;
import com.drore.logapp.utils.GlobalConfig;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

/**
 * desc
 *
 * @author sixbing
 * @date 2018/12/11 11:32
 */
public interface HttpApi {

    @POST(GlobalConfig.getLoganList)
    Observable<BaseBean<LogBean>> getLoganList(@Body RequestBody requestBody);

    //登录
    @GET(GlobalConfig.URL_LOGIN)
    Call<String> loginCookie();

    //登录
    @GET(GlobalConfig.URL_LOGIN)
    Observable<BaseBean<String>> loginToken(@Body RequestBody requestBody);

    @GET(GlobalConfig.URL_LOGIN)
    Observable<BaseBean> getUserDetail(@Query("token") String token);

    @POST(GlobalConfig.URL_LOGIN)
    Observable<BaseBean> getThingDetail(@Query("token") String token, @Body RequestBody requestBody);

    @POST(GlobalConfig.URL_LOGIN)
    Observable<BaseBean> getTimeOut();
}
